////子类隐藏基类中的成员
//#include <iostream>
//
//using namespace std;
//
//class Base {
//public:
//    int m_a;
//    void foo() { cout << "Base::foo()" << endl; }
//protected:
//    int m_b;
//    void bar() { cout << "Base::bar()" << endl; }
//private:
//    int m_c;
//    void hum() { cout << "Base::hum()" << endl; }
//};
////class Derived :public Base {
////class Derived:protected Base{
//class Derived :private Base {
//public:
//    void fun() {
//        m_a = 10; //ok
//        Base::foo();//ok 子类的foo将基类的foo隐藏
//        m_b = 20;//ok
//        Base::bar();//ok子类的bar将基类的bar隐藏
//        //m_c = 30;//error
//        //hum();//error//以上良好代码证明子类内部不可以访问基类的私有成员
//    }
//private:
//    int m_d;
//    void foo() { cout << "Derived::foo()" << endl; }
//    void bar() { cout << "Derived::bar()" << endl; }
//};
//int main(void) {
//    Derived d;//基类子对象 m_d-->m_a m_b m_c m_d 证明子类对象内部包含基类子对象
//    d.fun();
//    return 0;
//}